/**
 * 用户相关请求模块
 */
import qs from 'qs'
import request from '@/utils/request'

interface User {
  username: string
  password: string
}

/**
 * 登录
 * @param data
 * @returns
 */
export const login = (data: User) => {
  return request({
    method: 'POST',
    url: '/api/login',
    data: qs.stringify(data)
  })
}

/**
 * 获取用户信息
 */
export const getUserInfo = () => {
  return request({
    method: 'GET',
    url: '/api/get_user_info'
  })
}
